Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph API #191

Merged
merged 51 commits into from
Jul 1, 2023
Merged

Graph API #191

merged 51 commits into from
Jul 1, 2023

Conversation

djeedai
Copy link
Owner

@djeedai djeedai commented Jun 23, 2023

This change adds a large part of the Graph API, including most of the low-level
Expression API for code-first runtime-focused customizing of modifiers, and an
experimental preview of the higher level editing-focused Node API.

The graph module, as well as its expr and node submodules, contain design
notes and high-level introductions to the new Expression and Node APIs,
respectively.

The CHANGELOG has been updated with an exhaustive list of changes. We describe
here the main changes only.

Notably, this change removes the InitAgeModifier and InitLifetimeModifier,
which are superseeded by the more generic and powerful InitAttributeModifier,
which can initialize any particle attribute. The CHANGELOG lists all modifiers
which have been otherwise impacted by some changes.

This change is a major breaking change, and is accompanied by a migration guide
(in the docs/ folder) due to the large amount and complexity of changes
compared to previous releases. The migration from v0.6 is relatively
straightforward however, following the guide or looking at the examples.

All examples have been converted to this new Expression API, and are fully
functional. The change should be on parity with the previous architecture;
however if you notice any discrepancy or regression please open a bug.

@djeedai djeedai added A - documentation Improvements or additions to documentation C - enhancement New feature or request A - testing Add or improve testing A - internal Internal change on a core system A - examples Change related to examples A - modifiers Change related to modifiers C - breaking change A breaking API or behavior change A - components Change related to an ECS component D - complex Complex change labels Jun 23, 2023
@djeedai
Copy link
Owner Author

djeedai commented Jun 29, 2023

Comments from @NiseVoid on Discord:

Some quick findings: It works, but

  • It's easy to forget to add a module during the migration (because default screws you over)
  • It feels weird that only a small fraction of fields use this new format (but I guess that might just be future work)
  • I do see some code for some operators like normalize that don't seem to be available on ExprWriter
  • Some examples of more complicated effects would be nice, like a reimplementation of radial or tangential accel with just AccelModifier
  • The change in the README doesn't seem valid

Add a more complex example to showcase how expressions can help effect
authors customize the behavior of modifiers.
@djeedai djeedai merged commit 1ea1adb into main Jul 1, 2023
13 checks passed
@djeedai djeedai deleted the u/expr-enum-naga branch July 1, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - components Change related to an ECS component A - documentation Improvements or additions to documentation A - examples Change related to examples A - internal Internal change on a core system A - modifiers Change related to modifiers A - testing Add or improve testing C - breaking change A breaking API or behavior change C - enhancement New feature or request D - complex Complex change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant